<script setup>
// import axios from "axios";
import ajax from "@/components/utils/request.js";

// axios.post("localhost:5173/#/", {}, {}).then((data) => {
//   console.log(data)
// }).catch((err) => {
//   alert(err)
// })
// 报表测试
const url = "/oms-data-center-service/orderInterceptReport/list1";

let params = {
  companyId: 111,
  extractDayBegin: "2023-01-01",
  extractDayEnd: "2024-02-01",
  groupByCompany: 0,
  page: 1,
  pageSize: 10,
  warehouseId: 11101
};


async function doTestPost() {
  let {data} = await ajax.post({
        url, params
      }
  );
  console.log(data);
}

doTestPost()

let promise = new Promise((resolve, reject) => {
  // reject("异常")
  resolve("ok")
})
    .then((result) => {
      console.log("ok" + result);
      return Promise.reject("2");
    }, (err) => {
      console.log(err);
    })
    .then((result) => {

    }, (err) => {
      console.log("catch error " + err)
    })
    .catch((err) => {
      console.log(err);
    })


</script>

<template>
  <div class="container">
    <div class="row">
      <div class="col bg-light m-2">1</div>
      <div class="col bg-light m-2">2</div>
      <div class="col bg-light m-2">3</div>
    </div>
  </div>
  <div class="container">
    <nav aria-label="breadcrumb">
      <ol class="breadcrumb">
        <li class="breadcrumb-item"><a href="#">Home</a></li>
        <li class="breadcrumb-item"><a href="#">Library</a></li>
        <li class="breadcrumb-item active" aria-current="page">Data</li>
      </ol>
    </nav>
  </div>
  <div class="container">
    <button type="button" class="btn btn-primary">Primary</button>
    <button type="button" class="btn btn-secondary">Secondary</button>
    <button type="button" class="btn btn-success">Success</button>
    <button type="button" class="btn btn-danger">Danger</button>
    <button type="button" class="btn btn-warning">Warning</button>
  </div>
  <div class="container">
    <table class="table">
      <thead>
      <tr>
        <th scope="col">#</th>
        <th scope="col">First</th>
        <th scope="col">Last</th>
        <th scope="col">Handle</th>
      </tr>
      </thead>
      <tbody>
      <tr>
        <th scope="row">1</th>
        <td>Mark</td>
        <td>Otto</td>
        <td>@mdo</td>
      </tr>
      <tr>
        <th scope="row">2</th>
        <td>Jacob</td>
        <td>Thornton</td>
        <td>@fat</td>
      </tr>
      <tr>
        <th scope="row">3</th>
        <td colspan="2">Larry the Bird</td>
        <td>@twitter</td>
      </tr>
      </tbody>
    </table>
  </div>
  <div class="container">
    <select class="form-select" aria-label="Default select example">
      <option selected>Open this select menu</option>
      <option value="1">One</option>
      <option value="2">Two</option>
      <option value="3">Three</option>
    </select>
  </div>
  <div class="container">
    <div class="dropdown">
      <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton1" data-bs-toggle="dropdown"
              aria-expanded="false">
        Dropdown button
      </button>
      <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton1">
        <li><a class="dropdown-item" href="#">Action</a></li>
        <li><a class="dropdown-item" href="#">Another action</a></li>
        <li><a class="dropdown-item" href="#">Something else here</a></li>
      </ul>
    </div>
  </div>
  <router-link to="/">BACK TO TITLE</router-link>
</template>

<style scoped>

</style>